﻿/*------------------------------------------------
// File Description: Customer DataBase Entity
// Author:			 汪亮
// Create Time:		 2020-03-11 00:15:00
//------------------------------------------------*/

using System;
using System.Data.Entity;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace IOA.MES.DataAccess.Entity
{
    /// <summary>
    /// 客户表
    /// </summary>
    [Table(nameof(Customer))]
    public class Customer : BaseEntity
    {
        private string _customerCode = string.Empty;
        private string _customerName = string.Empty;

        #region Public Property

        ///<Summary>
        /// 客户编码
        ///</Summary>
        public string CustomerCode
        {
            get { return string.IsNullOrWhiteSpace(_customerCode) ? string.Empty : _customerCode; }
            set { _customerCode = value; }
        }

        ///<Summary>
        /// 客户名称
        ///</Summary>
        public string CustomerName
        {
            get { return string.IsNullOrWhiteSpace(_customerName) ? string.Empty : _customerName; }
            set { _customerName = value; }
        }
        #endregion
    }

    public partial class MESContext
    {
        /// <summary>
        /// 客户表
        /// </summary>
        public virtual DbSet<Customer> Customers { get; set; }
    }
}